<?php
require_once 'include/init.php';

require_once 'include/lib/WeiboClient.php';

$wc = new WeiboClient(WB_AKEY, WB_SKEY);

echo $wc->getRequestToken();

$api = 'oauth/request_token';
$param = array(
	'oauth_consumer_key' => WB_AKEY,
	'oauth_signature_method' => 'HMAC-SHA1',
	'oauth_timestamp' => time(),
	'oauth_nonce' => md5(rand(0, 99999)),
	'oauth_version' => '1.0',
);

$data = FetchCUrl('GET', 'oauth/request_token', $param);

echo '<br><br>' . urldecode($data);
